package com.hhf.feiojquestionservice.rabbit.publisher;

import com.hhf.feiojcommonservice.constant.RabbitMQConstant;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author hhf
 * @Date 2024/11/4
 * @Description 判题消息生产者
 */
@Component
public class JudgeMessagePublisher {

    @Resource
    private RabbitTemplate rabbitTemplate;


    public void sendMessage(String exchange, String routingKey, Object message){
        rabbitTemplate.convertAndSend(exchange,routingKey,message);
    }

}
